{{extend name="index/index" /}}
{{block name="main"}}

<!--main content start-->
<section id="main-content">
    <section class="wrapper">
        <!-- page start-->
        <div class="row">
            <div class="col-lg-12">
                <section class="panel">
                    <header class="panel-heading">
                        用户:<b>{{$nickname}}</b>的照片列表
                        <a class="btn btn-success btn-round btn-sm create-btn col-md-offset-6" data-toggle="modal"
                           href="#myModal2">添加照片</a>
                    </header>
                    <table class="table table-striped border-top table-advance table-hover" id="sample_1">
                        <thead>
                        <tr class="text-center">
                            <th class="hidden-phone">ID</th>
                            <th class="hidden-phone">照片</th>
                            <th class="hidden-phone">是否封面</th>
                            <th class="hidden-phone">操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        {{volist name='list' id='v' key='k'}}

                        <tr class="odd gradeX center">
                            <td class="hidden-phone ">{{$v.id}}</td>
                            <td class="hidden-phone "><img modal="zoomImg" src="{{$v.photo}}" width="100"></td>
                            <td class="hidden-phone ">

                                <button type="button" data-id="{{$v['id']}}" data-status="{{$v['cover']}}"
                                        class=" status-btn btn btn-round btn-sm {{$v.cover == 1?'btn-info':'btn-warning'}} ">
                                    {{$v.cover == 1?'封面':'非封面'}}
                                </button>
                            </td>
                            <td class="hidden-phone ">
                                <a class="btn btn-primary btn-round btn-sm edit-btn">更换照片</a>
                                <a class="btn btn-danger btn-round btn-sm del-btn">删除照片</a>
                            </td>
                        </tr>

                        {{/volist}}

                        </tbody>
                    </table>
                </section>
            </div>
            <!-- page end-->

            <!-- Modal2 -->
            <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                 aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                &times;
                            </button>
                            <h4 class="modal-title">添加图片</h4>
                        </div>
                        <div class="modal-body">

                            <form class="form-horizontal" role="form" id="myForm">

                                <div class="form-group" >
                                    <label for="exampleInputFile" class="control-label col-lg-47">点击上传照片</label>
                                    <div class="col-lg-5 col-lg-offset-1" >
                                        <label for="inputFile">
                                            <img src="/static/admin/img/click.jpg" id="myIcon" width="100"
                                                 class="img-rounded .img-responsive " style="border: 1px solid #000000">
                                        </label>
                                    </div>

                                    <div class="col-lg-1" style="display: none">
                                        <input type="file" id="inputFile" class="btn btn-primary"
                                               name="pic">
                                    </div>
                                </div>
                            </form>

                        </div>
                        <div class="modal-footer">
                            <button data-dismiss="modal" class="btn btn-default" type="button">关闭
                            </button>
                            <button class="btn btn-success save-btn" type="button">保存</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- modal2 -->


        </div>
    </section>
</section>

{{/block}}
{{block name='myjs'}}

{{/block}}